﻿<fp:ModuleControl x:Class="ForumsBrowser.CultureSelector"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:fp="clr-namespace:ForumsBrowser"
    x:Name="cultureSelector"
    VerticalAlignment="Stretch" HorizontalAlignment="Stretch"
    Style="{StaticResource ModuleStyle}" Title="Preferred Culture">
    <UserControl.Resources>
        <fp:CultureList x:Key="cultureList"/>
    </UserControl.Resources>
    <ListBox Grid.Row="1" Name="listBox1" SelectedValue="{Binding ElementName=cultureSelector, Path=SelectedCulture}" ScrollViewer.HorizontalScrollBarVisibility="Disabled" Background="Black" SelectionChanged="listBox1_SelectionChanged" VerticalAlignment="Stretch" HorizontalContentAlignment="Stretch" ItemsSource="{Binding Source={StaticResource cultureList} }" >
        <ListBox.ItemTemplate>
            <DataTemplate>
                <TextBlock Text="{Binding Path=DisplayName}" />
            </DataTemplate>
        </ListBox.ItemTemplate>
    </ListBox>
</fp:ModuleControl>
